#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include <Windows.h>
#include <conio.h>
#include<locale.h>
#include <stdlib.h>

#define HIGH 60
#define LONG 80

int i = 0;
int k = 0;

void gotoxy(int x, int y)//形参
{
    HANDLE hOut;
    COORD pos = { x,y };
    // 光标的起始位（第1列，第3行） 0是第1列 2是第3行
    hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(hOut, pos);
    //printf("定位光标位置搜索(%d,%d)\n",pos.X,pos.Y);
}
//
void paintWin(int Lon, int Hig, int x, int y)
{
    gotoxy(x, y);
    printf("┏");
    for (int i = 1; i < Lon; i++)
    {
        printf("━");
    }
    gotoxy(x + Lon, y);
    printf("┓\n");
    gotoxy(x, y + 1);
    for (int j = 1; j < Hig; j++)
    {
        gotoxy(x, j + y);
        printf("┃");
    }
    gotoxy(x, y + Lon);
    for (int m = 1; m < Hig; m++)
    {

        gotoxy(x + Lon, m + y);
        printf("┃\n");
    }

    gotoxy(x, y + Hig);
    printf("┗");
    for (int i = 1; i < Lon; i++)
    {
        printf("━");
    }
    gotoxy(x + Lon, y + Hig);
    printf("┛\n");
}

int main()
{
    paintWin(80, 30, 0, 0);//(长 宽，x位置，y位置)
    gotoxy(35, 1);
    printf("注 册 窗 口");
    gotoxy(20, 4);
    printf("用户名");
    paintWin(25, 3, 30, 3);
    gotoxy(20, 9);
    printf("密  码");
    paintWin(25, 3, 30, 7);
    gotoxy(19, 13);
    printf("确认密码");
    paintWin(25, 3, 30, 11);
    paintWin(10, 3, 24, 17);
    gotoxy(28, 18);
    printf("确认");
    paintWin(10, 3, 46, 17);
    gotoxy(50, 18);
    printf("退出");
    gotoxy(31, 5);
    gotoxy(60, 28);
    return 0;
}